package com.hsc.yalebao.tabMine;

import android.annotation.SuppressLint;
import android.content.Context;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.Bitmap.CompressFormat;
import android.graphics.drawable.BitmapDrawable;
import android.net.Uri;
import android.os.Bundle;
import android.os.Environment;
import android.os.Handler;
import android.text.Editable;
import android.text.TextUtils;
import android.text.format.DateUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.View.OnLongClickListener;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.ImageView.ScaleType;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import android.widget.RadioGroup.OnCheckedChangeListener;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.google.gson.Gson;
import com.handmark.pulltorefresh.library.ILoadingLayout;
import com.handmark.pulltorefresh.library.PullToRefreshBase;
import com.handmark.pulltorefresh.library.PullToRefreshBase.Mode;
import com.handmark.pulltorefresh.library.PullToRefreshBase.OnRefreshListener;
import com.handmark.pulltorefresh.library.PullToRefreshListView;
import com.hsc.yalebao.adapter.GetWaterRateListAdapter;
import com.hsc.yalebao.base.ActivityStack;
import com.hsc.yalebao.base.BaseActivity;
import com.hsc.yalebao.base.CustomApplication;
import com.hsc.yalebao.base.MainActivity;
import com.hsc.yalebao.http.AppConstants;
import com.hsc.yalebao.http.RequestNet;
import com.hsc.yalebao.model.BaseDataObject;
import com.hsc.yalebao.model.GetOauthAndReturnRuleInfoBean;
import com.hsc.yalebao.model.GetWaterRateListBaseBean;
import com.hsc.yalebao.model.GetWaterRateListModel;
import com.hsc.yalebao.model.ShareInfoBean;
import com.hsc.yalebao.model.UserBaseBean;
import com.hsc.yalebao.tools.UiUtil;
import com.hsc.yalebao.weight.CustomDialog;
import com.hsc.yalebao.weight.LogUtils;
import com.zhy.http.okhttp.callback.BitmapCallback;
import com.zhy.http.okhttp.callback.StringCallback;
import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import okhttp3.Call;

public class VipshareActivity extends BaseActivity
{
  private static Context context;
  private static File myCaptureFile;
  private String TAG = "VipshareActivity";
  private GetWaterRateListAdapter adapter;
  private ImageView btn_modify;
  private View emptyView;
  private EditText et_sure_psw;
  private EditText et_user_name;
  private EditText et_user_psw;
  private String guid = "";
  private ImageView img_commit;
  private ImageView img_copy_url;
  private boolean isEnd = false;
  private boolean isRefesh = true;
  private ImageView iv_down;
  private ImageView iv_getshorturl;
  private ImageView iv_qrcode;
  private ImageView iv_title_right;
  private RelativeLayout ll_lianjiekaihu;
  private LinearLayout ll_share_msg;
  private LinearLayout ll_share_title;
  private LinearLayout ll_zhijiekaihu;
  private PullToRefreshListView mPullRefreshListView;
  private int memberid;
  View.OnClickListener onClickListener = new View.OnClickListener()
  {
    public void onClick(View paramAnonymousView)
    {
      switch (paramAnonymousView.getId())
      {
      case 2131099704:
      default:
        return;
      case 2131099699:
        CustomApplication.app.finishActivity(VipshareActivity.this);
        return;
      case 2131099841:
        VipshareActivity.this.initDate();
        return;
      case 2131099715:
        VipshareActivity.this.showErWeimaPopupWindow();
        return;
      case 2131099707:
      }
      VipshareActivity.this.img_copy_url.setImageResource(2130838009);
      VipshareActivity.this.delayed(VipshareActivity.this.img_copy_url);
      String str = VipshareActivity.this.tv_short_url.getText().toString();
      if (TextUtils.isEmpty(str))
      {
        UiUtil.showToast("短链接地址为空");
        return;
      }
      UiUtil.showToast("短链接已复制到剪贴板");
      UiUtil.copy(str, VipshareActivity.context);
    }
  };
  private int page = 1;
  private RadioButton rb_title1;
  private RadioButton rb_title2;
  private ArrayList<GetWaterRateListBaseBean> result = new ArrayList();
  private RadioGroup rg_top_tag;
  private ShareInfoBean shareInfoBean;
  private TextView tv_guize;
  private TextView tv_id;
  private TextView tv_miaoshu;
  private TextView tv_short_url;
  private TextView tv_tishi;
  private LinearLayout tv_tishi1;
  private TextView tv_tishi2;
  private String usernam;
  private String userpwd;
  private String userpwd2;
  private View view_title;

  private void delayed(final ImageView paramImageView)
  {
    new Handler().postDelayed(new Runnable()
    {
      public void run()
      {
        if (paramImageView != null)
          paramImageView.setImageResource(2130838008);
      }
    }
    , 2000L);
  }

  private void getShareInfo()
  {
    HashMap localHashMap = new HashMap();
    localHashMap.put("Type", "2");
    localHashMap.put("guid", this.guid);
    showLoadingDialog();
    RequestNet.get(context, AppConstants.URL_GET_GETSHAREURL, localHashMap, new StringCallback()
    {
      public void onError(Call paramAnonymousCall, Exception paramAnonymousException)
      {
        LogUtils.e("注册失败", "register-result:" + paramAnonymousException);
        VipshareActivity.this.dismissLoadingDialog();
      }

      public void onResponse(String paramAnonymousString)
      {
        VipshareActivity.this.dismissLoadingDialog();
        if (paramAnonymousString.isEmpty());
        while (true)
        {
          return;
          LogUtils.e(VipshareActivity.this.TAG, "代理注册结果：" + paramAnonymousString);
          Gson localGson = new Gson();
          VipshareActivity.this.shareInfoBean = null;
          try
          {
            VipshareActivity.this.shareInfoBean = ((ShareInfoBean)localGson.fromJson(paramAnonymousString, ShareInfoBean.class));
            if ((VipshareActivity.this.shareInfoBean == null) || (VipshareActivity.this.shareInfoBean.getFlag() == -2) || (VipshareActivity.this.shareInfoBean.getFlag() == -3) || (VipshareActivity.this.shareInfoBean.getFlag() == 1) || (VipshareActivity.this.shareInfoBean.getFlag() != -4))
              continue;
            VipshareActivity.activityStack.backToMain(MainActivity.class, VipshareActivity.context);
            return;
          }
          catch (Exception localException)
          {
            while (true)
              localException.printStackTrace();
          }
        }
      }
    });
  }

  private void getVipListProfitList()
  {
    if (CustomApplication.app.userBaseBean != null)
      this.memberid = CustomApplication.app.userBaseBean.getMemberid();
    HashMap localHashMap = new HashMap();
    localHashMap.put("type", "1");
    LogUtils.d(this.TAG, "URL:" + AppConstants.URL_GET_GETWATERRATELIST);
    showLoadingDialog();
    RequestNet.get(context, AppConstants.URL_GET_GETWATERRATELIST, localHashMap, new StringCallback()
    {
      public void onError(Call paramAnonymousCall, Exception paramAnonymousException)
      {
        VipshareActivity.this.dismissLoadingDialog();
        LogUtils.e(VipshareActivity.this.TAG, "获取失败,获取提现记录:" + paramAnonymousException);
        VipshareActivity.this.mPullRefreshListView.onRefreshComplete();
        VipshareActivity.this.mPullRefreshListView.setEmptyView(VipshareActivity.this.emptyView);
      }

      public void onResponse(String paramAnonymousString)
      {
        VipshareActivity.this.dismissLoadingDialog();
        VipshareActivity.this.mPullRefreshListView.onRefreshComplete();
        LogUtils.d(VipshareActivity.this.TAG, "result:" + paramAnonymousString);
        if (UiUtil.IsValueEmpty(paramAnonymousString))
        {
          LogUtils.d(VipshareActivity.this.TAG, "result:" + paramAnonymousString);
          VipshareActivity.this.mPullRefreshListView.setEmptyView(VipshareActivity.this.emptyView);
        }
        GetWaterRateListModel localGetWaterRateListModel;
        do
        {
          return;
          Gson localGson = new Gson();
          try
          {
            localGetWaterRateListModel = (GetWaterRateListModel)localGson.fromJson(paramAnonymousString, GetWaterRateListModel.class);
            if (localGetWaterRateListModel == null)
            {
              LogUtils.e(VipshareActivity.this.TAG, "获取失败");
              VipshareActivity.this.mPullRefreshListView.setEmptyView(VipshareActivity.this.emptyView);
              return;
            }
          }
          catch (Exception localException)
          {
            while (true)
            {
              localException.printStackTrace();
              localGetWaterRateListModel = null;
            }
            if (localGetWaterRateListModel.getFlag() == 0)
            {
              LogUtils.e(VipshareActivity.this.TAG, "returnwaterResultModel.getFlag() != 1,0,-2");
              VipshareActivity.this.mPullRefreshListView.setEmptyView(VipshareActivity.this.emptyView);
              VipshareActivity.this.tv_tishi.setText("暂无数据");
              return;
            }
            if (localGetWaterRateListModel.getFlag() == -2)
            {
              VipshareActivity.this.showDownWireDialog();
              return;
            }
            if (localGetWaterRateListModel.getFlag() == -3)
            {
              VipshareActivity.this.ShowFengjinDialog();
              return;
            }
            if (localGetWaterRateListModel.getFlag() == -4)
            {
              VipshareActivity.activityStack.backToMain(MainActivity.class, VipshareActivity.context);
              return;
            }
          }
        }
        while (localGetWaterRateListModel.getFlag() != 1);
        if (localGetWaterRateListModel.getResult() == null)
        {
          LogUtils.e(VipshareActivity.this.TAG, "bean.getResult() == null");
          return;
        }
        VipshareActivity.this.result.addAll(localGetWaterRateListModel.getResult());
        if ((VipshareActivity.this.result == null) || (VipshareActivity.this.result.size() == 0))
        {
          VipshareActivity.this.mPullRefreshListView.setEmptyView(VipshareActivity.this.emptyView);
          VipshareActivity.this.tv_tishi.setText("暂无数据");
        }
        VipshareActivity.this.adapter.setData(VipshareActivity.this.result);
        VipshareActivity.this.adapter.notifyDataSetChanged();
      }
    });
  }

  private void getoauthandreturnruleinfo()
  {
    HashMap localHashMap = new HashMap();
    LogUtils.d(this.TAG, "URL:" + AppConstants.URL_GETOAUTHANDRETURNRULEINFO);
    showLoadingDialog();
    RequestNet.get(context, AppConstants.URL_GETOAUTHANDRETURNRULEINFO, localHashMap, new StringCallback()
    {
      public void onError(Call paramAnonymousCall, Exception paramAnonymousException)
      {
        VipshareActivity.this.dismissLoadingDialog();
      }

      public void onResponse(String paramAnonymousString)
      {
        VipshareActivity.this.dismissLoadingDialog();
        LogUtils.d(VipshareActivity.this.TAG, "getoauthandreturnruleinfo   result:" + paramAnonymousString);
        if (UiUtil.IsValueEmpty(paramAnonymousString))
          LogUtils.d(VipshareActivity.this.TAG, "getoauthandreturnruleinfo result:" + paramAnonymousString);
        int i;
        do
        {
          GetOauthAndReturnRuleInfoBean localGetOauthAndReturnRuleInfoBean;
          do
          {
            do
            {
              return;
              Gson localGson = new Gson();
              try
              {
                localGetOauthAndReturnRuleInfoBean = (GetOauthAndReturnRuleInfoBean)localGson.fromJson(paramAnonymousString, GetOauthAndReturnRuleInfoBean.class);
                if (localGetOauthAndReturnRuleInfoBean == null)
                {
                  LogUtils.e(VipshareActivity.this.TAG, "获取失败");
                  return;
                }
              }
              catch (Exception localException)
              {
                while (true)
                {
                  localException.printStackTrace();
                  localGetOauthAndReturnRuleInfoBean = null;
                }
              }
            }
            while (localGetOauthAndReturnRuleInfoBean.getFlag() == 0);
            if (localGetOauthAndReturnRuleInfoBean.getFlag() == -2)
            {
              VipshareActivity.this.showDownWireDialog();
              return;
            }
            if (localGetOauthAndReturnRuleInfoBean.getFlag() == -3)
            {
              VipshareActivity.this.ShowFengjinDialog();
              return;
            }
            if (localGetOauthAndReturnRuleInfoBean.getFlag() == -4)
            {
              VipshareActivity.activityStack.backToMain(MainActivity.class, VipshareActivity.context);
              return;
            }
          }
          while (localGetOauthAndReturnRuleInfoBean.getFlag() != 1);
          i = localGetOauthAndReturnRuleInfoBean.getVip_votecount();
        }
        while (i == 0);
        VipshareActivity.this.tv_guize.setText("1.条件：VIP分享所发展的用户每天投注满 " + i + " 次；\n2.佣金：按下线用户有效投注额为准（元宝）；");
      }
    });
  }

  private void init()
  {
    this.tv_guize = ((TextView)findViewById(2131099860));
    this.emptyView = LayoutInflater.from(context).inflate(2130903139, null);
    this.tv_tishi = ((TextView)this.emptyView.findViewById(2131100053));
    this.tv_tishi.setText("暂无数据");
    this.mPullRefreshListView = ((PullToRefreshListView)findViewById(2131099723));
    this.mPullRefreshListView.setMode(PullToRefreshBase.Mode.DISABLED);
    this.mPullRefreshListView.setOnRefreshListener(new PullToRefreshBase.OnRefreshListener()
    {
      public void onRefresh(PullToRefreshBase<ListView> paramAnonymousPullToRefreshBase)
      {
        String str = DateUtils.formatDateTime(VipshareActivity.this.getApplicationContext(), System.currentTimeMillis(), 524305);
        paramAnonymousPullToRefreshBase.getLoadingLayoutProxy().setLastUpdatedLabel(str);
        if (VipshareActivity.this.mPullRefreshListView.isHeaderShown())
        {
          VipshareActivity.this.isRefesh = true;
          LogUtils.e(VipshareActivity.this.TAG, "mPullRefreshListView刷新");
          return;
        }
        VipshareActivity.this.isRefesh = false;
        LogUtils.e(VipshareActivity.this.TAG, "mPullRefreshListView加载");
        if (VipshareActivity.this.isEnd)
          UiUtil.showToast(VipshareActivity.context, "暂无更多数据");
        VipshareActivity localVipshareActivity = VipshareActivity.this;
        localVipshareActivity.page = (1 + localVipshareActivity.page);
        VipshareActivity.this.getVipListProfitList();
      }
    });
    if (this.adapter == null)
    {
      this.adapter = new GetWaterRateListAdapter(context, this.result);
      this.mPullRefreshListView.setAdapter(this.adapter);
    }
    this.adapter.notifyDataSetChanged();
    this.ll_share_title = ((LinearLayout)findViewById(2131099984));
    this.ll_share_msg = ((LinearLayout)findViewById(2131099985));
    this.tv_tishi1 = ((LinearLayout)findViewById(2131099846));
    this.tv_tishi2 = ((TextView)findViewById(2131099848));
    this.tv_tishi1.setVisibility(8);
    this.tv_tishi2.setVisibility(8);
    this.tv_id = ((TextView)findViewById(2131099847));
    this.et_user_name = ((EditText)findViewById(2131099839));
    this.et_user_psw = ((EditText)findViewById(2131099840));
    this.et_sure_psw = ((EditText)findViewById(2131099759));
    this.tv_miaoshu = ((TextView)findViewById(2131099845));
    this.img_commit = ((ImageView)findViewById(2131099841));
    this.img_copy_url = ((ImageView)findViewById(2131099707));
    this.img_copy_url.setOnClickListener(this.onClickListener);
    this.tv_short_url = ((TextView)findViewById(2131099844));
    this.iv_qrcode = ((ImageView)findViewById(2131099714));
    this.iv_down = ((ImageView)findViewById(2131099715));
    this.iv_down.setOnClickListener(this.onClickListener);
    this.img_commit.setOnClickListener(this.onClickListener);
    this.rg_top_tag = ((RadioGroup)findViewById(2131099835));
    this.rb_title1 = ((RadioButton)findViewById(2131099836));
    this.rb_title2 = ((RadioButton)findViewById(2131099837));
    this.rg_top_tag.check(2131099836);
    this.ll_zhijiekaihu = ((LinearLayout)findViewById(2131099838));
    this.ll_lianjiekaihu = ((RelativeLayout)findViewById(2131099842));
    this.ll_lianjiekaihu.setVisibility(8);
    this.tv_miaoshu.setVisibility(8);
    this.rg_top_tag.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener()
    {
      public void onCheckedChanged(RadioGroup paramAnonymousRadioGroup, int paramAnonymousInt)
      {
        switch (paramAnonymousInt)
        {
        default:
          return;
        case 2131099836:
          VipshareActivity.this.tv_tishi1.setVisibility(8);
          VipshareActivity.this.tv_tishi2.setVisibility(8);
          VipshareActivity.this.ll_zhijiekaihu.setVisibility(0);
          VipshareActivity.this.ll_lianjiekaihu.setVisibility(8);
          VipshareActivity.this.tv_miaoshu.setVisibility(8);
          VipshareActivity.this.mPullRefreshListView.setVisibility(0);
          VipshareActivity.this.ll_share_title.setVisibility(0);
          VipshareActivity.this.ll_share_msg.setVisibility(0);
          return;
        case 2131099837:
        }
        VipshareActivity.this.tv_tishi1.setVisibility(0);
        VipshareActivity.this.tv_tishi2.setVisibility(0);
        VipshareActivity.this.ll_zhijiekaihu.setVisibility(8);
        VipshareActivity.this.ll_lianjiekaihu.setVisibility(0);
        VipshareActivity.this.tv_miaoshu.setVisibility(0);
        VipshareActivity.this.mPullRefreshListView.setVisibility(8);
        VipshareActivity.this.ll_share_title.setVisibility(8);
        VipshareActivity.this.ll_share_msg.setVisibility(8);
      }
    });
  }

  private void initDate()
  {
    if (CustomApplication.app.userBaseBean != null)
      this.memberid = CustomApplication.app.userBaseBean.getMemberid();
    this.usernam = this.et_user_name.getText().toString().trim();
    this.userpwd = this.et_user_psw.getText().toString().trim();
    this.userpwd2 = this.et_sure_psw.getText().toString().trim();
    if ("".equals(this.usernam))
    {
      UiUtil.showToast(context, "用户名不能为空");
      return;
    }
    if ("".equals(this.userpwd))
    {
      UiUtil.showToast(context, "密码不能为空");
      return;
    }
    if (!UiUtil.isValidUserName(this.userpwd))
    {
      UiUtil.showToast(context, "密码应为6~12位字母或数字");
      return;
    }
    if ("".equals(this.userpwd2))
    {
      UiUtil.showToast(context, "确认密码不能为空");
      return;
    }
    if (!this.userpwd.equals(this.userpwd2))
    {
      UiUtil.showToast(context, "两次密码不一致");
      return;
    }
    registdaili();
  }

  private void registdaili()
  {
    HashMap localHashMap = new HashMap();
    localHashMap.put("nick_name", "");
    localHashMap.put("user_name", this.usernam);
    localHashMap.put("password", this.userpwd);
    localHashMap.put("pid", this.memberid);
    LogUtils.i(this.TAG, "url" + AppConstants.URL_REGISTER);
    showLoadingDialog();
    setQuedingBtnIsEnable(false);
    RequestNet.get(context, AppConstants.URL_REGISTER, localHashMap, new StringCallback()
    {
      public void onError(Call paramAnonymousCall, Exception paramAnonymousException)
      {
        LogUtils.e("注册失败", "register-result:" + paramAnonymousException);
        VipshareActivity.this.dismissLoadingDialog();
        VipshareActivity.this.setQuedingBtnIsEnable(true);
      }

      public void onResponse(String paramAnonymousString)
      {
        VipshareActivity.this.dismissLoadingDialog();
        VipshareActivity.this.setQuedingBtnIsEnable(true);
        if (paramAnonymousString.isEmpty());
        while (true)
        {
          return;
          LogUtils.e(VipshareActivity.this.TAG, "代理注册结果：" + paramAnonymousString);
          Gson localGson = new Gson();
          try
          {
            localBaseDataObject = (BaseDataObject)localGson.fromJson(paramAnonymousString, BaseDataObject.class);
            if (localBaseDataObject != null)
              if (localBaseDataObject.getFlag() == -2)
              {
                VipshareActivity.this.showDownWireDialog();
                return;
              }
          }
          catch (Exception localException)
          {
            BaseDataObject localBaseDataObject;
            while (true)
            {
              localException.printStackTrace();
              localBaseDataObject = null;
            }
            if (localBaseDataObject.getFlag() == -3)
            {
              VipshareActivity.this.ShowFengjinDialog();
              return;
            }
            if (localBaseDataObject.getFlag() == -4)
            {
              VipshareActivity.activityStack.backToMain(MainActivity.class, VipshareActivity.context);
              return;
            }
            if (localBaseDataObject.getFlag() == 1)
            {
              VipshareActivity.this.ShowDialog1(localBaseDataObject.getMsg());
              VipshareActivity.this.et_user_name.setText("");
              VipshareActivity.this.et_user_psw.setText("");
              VipshareActivity.this.et_sure_psw.setText("");
              return;
            }
            VipshareActivity.this.ShowDialog1(localBaseDataObject.getMsg());
          }
        }
      }
    });
  }

  public static void saveFile(Bitmap paramBitmap, String paramString1, String paramString2)
    throws IOException
  {
    String str = Environment.getExternalStorageDirectory().getAbsolutePath() + paramString2;
    File localFile = new File(str);
    if (!localFile.exists())
      localFile.mkdirs();
    myCaptureFile = new File(str, paramString1);
    if (!myCaptureFile.exists())
      myCaptureFile.createNewFile();
    BufferedOutputStream localBufferedOutputStream = new BufferedOutputStream(new FileOutputStream(myCaptureFile));
    paramBitmap.compress(Bitmap.CompressFormat.JPEG, 80, localBufferedOutputStream);
    UiUtil.showToast(context, "保存二维码成功");
    localBufferedOutputStream.flush();
    localBufferedOutputStream.close();
  }

  private void setQuedingBtnIsEnable(boolean paramBoolean)
  {
    if (paramBoolean)
      this.img_commit.setImageResource(2130838215);
    while (true)
    {
      this.img_commit.setEnabled(paramBoolean);
      return;
      this.img_commit.setImageResource(2130837741);
    }
  }

  private void setqrcode(String paramString)
  {
    String str = AppConstants.BASE_URL_IMG + paramString;
    RequestNet.bindImageToView(str, context, new BitmapCallback()
    {
      public void onError(Call paramAnonymousCall, Exception paramAnonymousException)
      {
        LogUtils.e(VipshareActivity.this.TAG, "loadImage-访问失败");
      }

      public void onResponse(Bitmap paramAnonymousBitmap)
      {
        LogUtils.d(VipshareActivity.this.TAG, "下载图像成功");
        if (paramAnonymousBitmap != null)
        {
          VipshareActivity.this.iv_qrcode.setImageBitmap(paramAnonymousBitmap);
          VipshareActivity.this.iv_qrcode.setScaleType(ImageView.ScaleType.CENTER_CROP);
          VipshareActivity.this.iv_down.setVisibility(0);
          VipshareActivity.this.iv_qrcode.setOnLongClickListener(new View.OnLongClickListener()
          {
            public boolean onLongClick(View paramAnonymous2View)
            {
              VipshareActivity.this.showErWeimaPopupWindow();
              return true;
            }
          });
          return;
        }
        LogUtils.e(VipshareActivity.this.TAG, "图像bitmap==null");
      }
    });
    LogUtils.d(this.TAG, "qrcodeRel:" + str);
  }

  public void getShortUrl()
  {
    if (CustomApplication.app.userBaseBean != null)
      this.memberid = CustomApplication.app.userBaseBean.getMemberid();
    HashMap localHashMap = new HashMap();
    localHashMap.put("memberid", this.memberid);
    LogUtils.i(this.TAG, "url" + AppConstants.URL_GET_GETSHORTURL);
    showLoadingDialog();
    RequestNet.get(context, AppConstants.URL_GET_GETSHORTURL, localHashMap, new StringCallback()
    {
      public void onError(Call paramAnonymousCall, Exception paramAnonymousException)
      {
        LogUtils.e("注册失败", "register-result:" + paramAnonymousException);
        VipshareActivity.this.dismissLoadingDialog();
      }

      public void onResponse(String paramAnonymousString)
      {
        VipshareActivity.this.dismissLoadingDialog();
        if (paramAnonymousString.isEmpty());
        VipshareActivity.ShortUrl localShortUrl;
        do
        {
          do
            while (true)
            {
              return;
              LogUtils.e(VipshareActivity.this.TAG, "代理注册结果：" + paramAnonymousString);
              Gson localGson = new Gson();
              try
              {
                localShortUrl = (VipshareActivity.ShortUrl)localGson.fromJson(paramAnonymousString, VipshareActivity.ShortUrl.class);
                if (localShortUrl != null)
                  if (localShortUrl.flag == -2)
                  {
                    VipshareActivity.this.showDownWireDialog();
                    return;
                  }
              }
              catch (Exception localException)
              {
                while (true)
                {
                  localException.printStackTrace();
                  localShortUrl = null;
                }
                if (localShortUrl.flag == -3)
                {
                  VipshareActivity.this.ShowFengjinDialog();
                  return;
                }
                if (localShortUrl.flag == -4)
                {
                  VipshareActivity.activityStack.backToMain(MainActivity.class, VipshareActivity.context);
                  return;
                }
              }
            }
          while (localShortUrl.flag != 1);
          if (!TextUtils.isEmpty(localShortUrl.address))
          {
            VipshareActivity.this.setqrcode(localShortUrl.address);
            LogUtils.e(VipshareActivity.this.TAG, "bean.address:" + localShortUrl.address);
          }
        }
        while (TextUtils.isEmpty(localShortUrl.shorturl));
        VipshareActivity.this.tv_short_url.setText(localShortUrl.shorturl);
      }
    });
  }

  protected void onCreate(Bundle paramBundle)
  {
    super.onCreate(paramBundle);
    CustomApplication.app.addActivity(this);
    context = this;
    setContentView(2130903088);
    init();
    setTitle(8, 0, 2130837809, "VIP 分享", 0, 8, 8, 2130837799, true);
    if (CustomApplication.app.userBaseBean != null)
    {
      this.guid = CustomApplication.app.userBaseBean.getGuid();
      this.memberid = CustomApplication.app.userBaseBean.getMemberid();
      this.tv_id.setText(this.memberid);
      getShareInfo();
      getVipListProfitList();
      getoauthandreturnruleinfo();
    }
  }

  protected void onDestroy()
  {
    super.onDestroy();
  }

  protected void onPause()
  {
    super.onPause();
    if (myCaptureFile != null)
      sendBroadcast(new Intent("android.intent.action.MEDIA_SCANNER_SCAN_FILE", Uri.fromFile(myCaptureFile)));
    closeWindowSoftInput(this.et_user_name);
    closeWindowSoftInput(this.et_user_psw);
    closeWindowSoftInput(this.et_sure_psw);
  }

  protected void onResume()
  {
    super.onResume();
    getShortUrl();
  }

  @SuppressLint({"NewApi"})
  public void setTitle(int paramInt1, int paramInt2, int paramInt3, String paramString, int paramInt4, int paramInt5, int paramInt6, int paramInt7, boolean paramBoolean)
  {
    View localView = findViewById(2131099716);
    if (paramBoolean)
      localView.setVisibility(0);
    while (true)
    {
      ((TextView)localView.findViewById(2131099701)).setText(paramString);
      ((TextView)localView.findViewById(2131099700)).setVisibility(paramInt1);
      ImageView localImageView = (ImageView)localView.findViewById(2131099699);
      localImageView.setVisibility(paramInt2);
      localImageView.setOnClickListener(this.onClickListener);
      localImageView.setImageResource(paramInt3);
      TextView localTextView = (TextView)localView.findViewById(2131099702);
      localTextView.setVisibility(paramInt5);
      localTextView.setOnClickListener(this.onClickListener);
      this.iv_title_right = ((ImageView)localView.findViewById(2131099704));
      this.iv_title_right.setVisibility(paramInt6);
      this.iv_title_right.setOnClickListener(this.onClickListener);
      this.iv_title_right.setImageResource(paramInt7);
      return;
      localView.setVisibility(8);
    }
  }

  public void showErWeimaPopupWindow()
  {
    View localView = LayoutInflater.from(this).inflate(2130903172, null);
    TextView localTextView1 = (TextView)localView.findViewById(2131100231);
    TextView localTextView2 = (TextView)localView.findViewById(2131100232);
    final CustomDialog localCustomDialog = new CustomDialog(this, 2131361804).create(localView, true, 1.0F, 0.2F, 1.0F);
    localCustomDialog.show();
    localTextView1.setOnClickListener(new View.OnClickListener()
    {
      public void onClick(View paramAnonymousView)
      {
        Bitmap localBitmap = ((BitmapDrawable)VipshareActivity.this.iv_qrcode.getDrawable()).getBitmap();
        try
        {
          VipshareActivity.saveFile(localBitmap, "qrcode5.jpg", "/pic");
          localCustomDialog.dismiss();
          return;
        }
        catch (IOException localIOException)
        {
          while (true)
            localIOException.printStackTrace();
        }
      }
    });
    localTextView2.setOnClickListener(new View.OnClickListener()
    {
      public void onClick(View paramAnonymousView)
      {
        localCustomDialog.dismiss();
      }
    });
  }

  public static class ShortUrl
  {
    public String address;
    public int flag;
    public String msg;
    public String shorturl;
  }
}

/* Location:           C:\Users\user\Desktop\dd28_pcdd720\classes_dex2jar.jar
 * Qualified Name:     com.hsc.yalebao.tabMine.VipshareActivity
 * JD-Core Version:    0.6.2
 */